@extends('shared.adminBase')
@section('title','发送站内信')
@section('content')
    <section class="content-header">
        <h1>发送站内信</h1>
        <ol class="breadcrumb">
            <li><a href="{{URL::action('AdminController@innerIndex')}}"><i class="fa fa-dashboard"></i> 首页</a>
            </li>
            <li class="active">发送站内信</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->
                <div class="box">
                    <!-- /.box-header -->
                    <div class="box-body col-md-12">
                        <form id="form1" action="{{URL::action('GameController@storeBroadcast')}}"
                              method="post" enctype="multipart/form-data">
                            {{csrf_field()}}
                            <div class="form-group">
                                <label>站内信类型<span style="color:red;">&nbsp;*</span></label>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="type"
                                               value="{{App\Framework\Enum\BroadcastTypeEnum::PERSONAL}}"
                                               checked="checked">
                                        {{App\Framework\Enum\BroadcastTypeEnum::getName(App\Framework\Enum\BroadcastTypeEnum::PERSONAL)}}
                                    </label>
                                    <label>
                                        <input type="radio" name="type"
                                               value="{{App\Framework\Enum\BroadcastTypeEnum::SYSTEM_NOTICE}}">
                                        {{App\Framework\Enum\BroadcastTypeEnum::getName(App\Framework\Enum\BroadcastTypeEnum::SYSTEM_NOTICE)}}
                                    </label>
                                    <label>
                                        <input type="radio" name="type"
                                               value="{{App\Framework\Enum\BroadcastTypeEnum::SYSTEM_BROADCAST}}">
                                        {{App\Framework\Enum\BroadcastTypeEnum::getName(App\Framework\Enum\BroadcastTypeEnum::SYSTEM_BROADCAST)}}
                                    </label>
                                </div>
                                @if($errors->has('type'))
                                    <span class="help-block">
                                         <strong class="text-danger">{{$errors->first('type')}}</strong>
                                    </span>
                                @endif
                            </div>
                            <div class="form-group">
                                <label>玩家ID</label>
                                <input type="text" name="userID" class="form-control" style="width:50%;"
                                       placeholder="请填写玩家ID">
                                <small>当消息类型为“私人消息”时，此项必填</small>
                                @if($errors->has('userID'))
                                    <span class="help-block">
                                         <strong class="text-danger">{{$errors->first('userID')}}</strong>
                                    </span>
                                @endif
                            </div>

                            <div class="form-group">
                                <label>站内信内容<span style="color:red;">&nbsp;*</span></label>
                                <textarea class="form-control" cols="20" rows="10" name="content"
                                          style="width:50%;"></textarea>
                                @if($errors->has('content'))
                                    <span class="help-block">
                                         <strong class="text-danger">{{$errors->first('content')}}</strong>
                                    </span>
                                @endif
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-default">提交</button>
                                <button type="button" onclick="history.back();" class="btn btn-default">返回</button>
                            </div>
                        </form>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
@endsection

